#include"process.h"


char style[S_NUM]={'-','.','#','>','+','&'};


void ProncessOn()
{
    int cnt=0;
    char bar[NUM];
    memset(bar,'\0',sizeof(bar));

    //设计一个下载时的转动图
    char* lable="|\\-/";

    //101times
    while(cnt<=100)
    {
        printf("[%-100s][%d%%][%c]\r",bar,cnt,lable[cnt%4]);
        fflush(stdout);
        bar[cnt]=style[N];
        cnt++;
        //sleep(1);
        usleep(50000); //usleep以微秒的形式sleep 5s/100==0.05s==50000
    }

    printf("\n");


}
